Public Function GetToolInfo(CommandNames As Variant, MenuCaptions As Variant, StatusPrompts As Variant, ToolTips As Variant, Enabled As Variant, WantsUpdates As Variant) As Long
ReDim CommandNames(NUM_TOOLS)
ReDim MenuCaptions(NUM_TOOLS, 2)
ReDim StatusPrompts(NUM_TOOLS)
ReDim ToolTips(NUM_TOOLS)
ReDim Enabled(NUM_TOOLS)
ReDim WantsUpdates(NUM_TOOLS)
Dim sICmd As String
CommandNames(0) = "SDK|SDK Line "
MenuCaptions(0, 0) = "&SDK Line"
MenuCaptions(0, 1) = "SDK Line" ' toolbar name
StatusPrompts(0) = "SDK Line"
ToolTips(0) = "SDK Line"
Enabled(0) = True
WantsUpdates(0) = False
CommandNames(1) = "SDK|SDK PolyLine "
MenuCaptions(1, 0) = "&SDK PolyLine"
MenuCaptions(1, 1) = "SDK Line" ' toolbar name
StatusPrompts(1) = "SDK PolyLine"
ToolTips(1) = "SDK PolyLine"
Enabled(1) = True
WantsUpdates(1) = False
GetToolInfo = NUM_TOOLS
End Function
Public Function UpdateToolStatus(ByVal Tool As Tool, Enabled As Boolean, Checked As Boolean) As Boolean
Enabled = True
Checked = False
Select Case Tool.Index
Case 0
If (m_bRun(0) = True) Then
Checked = True
End If
Case 1
If (m_bRun(1) = True) Then
Checked = True
End If
End Select
UpdateToolStatus = True
End Function
Public Function GetPicture(ByVal LargeImage As Boolean, ByVal MonoImage As Boolean) As Object
On Error GoTo PictureError
Dim TheImage As New StdPicture
If GetButtonPicture(LargeImage, MonoImage, TheImage) Then
Set GetPicture = TheImage
Exit Function
End If
PictureError:
Set GetPicture = Nothing
End Function
Private Function GetButtonPicture(ByVal LargeImage As Boolean, ByVal MonoImage As Boolean, TheImage As StdPicture) As Boolean
On Error GoTo ErrorHandler
'There are two ways to load images: from .Bmp file(s) or from .RES resource.
'In this demo, we control the loading by a private variable.
'Note that if you are loading from .Bmp, or if you are running this tool as a
'.VBP for debugging, you must place the .Res or .Bmp files in the Draggers subdirectory
'of the directory in which TCW11.EXE (or IMSIGX.DLL) is located.
'Load from .Res file
Dim idBitmap% 'BITMAP resource id in .Res file
If LargeImage Then
idBitmap% = 101
Else
idBitmap% = 102 '101
End If
Set TheImage = LoadResPicture(idBitmap%, vbResBitmap)
GetButtonPicture = True
Exit Function
ErrorHandler:
GetButtonPicture = False
End Function
Public Function Initialize(ByVal Tool As Tool) As Boolean